import SvgIcon from "@/components/SvgIcon/index.vue";
import Pagination from "@/components/Pagination/index.vue";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

// 创建全部全局组件对象
const allGloablComponents = { SvgIcon, Pagination };

// 对外暴露插件对象
export default {
  install(app: any) {
    // 注册项目全部的全局组件
    Object.keys(allGloablComponents).forEach((key) => {
      app.component(key, allGloablComponents[key]);
    });
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component);
    }
  },
};
